\documentclass[12pt,letterpaper,oneside,final]{book}

\usepackage[portuges,brazil]{babel}
\usepackage[utf8]{inputenc}

\usepackage{longtable}
\usepackage{indentfirst}
\usepackage{ae}
%\usepackage{html}
\usepackage{url}
\usepackage{harvard}
\usepackage{amssymb,fancyhdr,fancybox,epsfig,psfrag,amsmath,tabularx}
%for appendix
\usepackage{wasysym}% provides \ocircle and \Box
\usepackage{enumitem}% easy control of topsep and leftmargin for lists
\usepackage{color}% used for background color
\usepackage{forloop}% used for \Qrating and \Qlines
\usepackage{ifthen}% used for \Qitem and \QItem
\usepackage[hang]{subfigure}
\usepackage{typearea}
\usepackage{scrpage2}

\usepackage{multirow}


%tamanho letter
\usepackage[paperwidth=8.5in,paperheight=11in,hmargin={3cm,2cm},vmargin={3cm,2cm}]{geometry}

\usepackage[chapter]{algorithm}
% traduz List of Algorithms
\makeatletter
\renewcommand{\ALG@name}{Algoritmo}
\makeatother
%\renewcommand{\listalgorithmname}{Lista de Algoritmos}
%\usepackage{algorithmic}

\usepackage[color]{showkeys}
\definecolor{refkey}{rgb}{0.39,0.58,1}
\definecolor{labeled}{rgb}{1,0,0}
\usepackage[Lenny]{fncychap}
\setlength{\headheight}{15pt}

%=========================================== Headers =========================================
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter. \ #1}{ }}
\renewcommand{\sectionmark}[1]{\markright{\thesection. \ #1}}
\fancyhead{}
\fancyfoot{}
\fancyhead[LO]{\nouppercase{\leftmark}}
\fancyhead[RO]{\thepage}

\input{macros}

\begin{document}

\pagenumbering{roman}
\pagestyle{plain}

%Tese em portugués
\input{capa}

%comentado 2 lineas ELIAS
%\input{dedicatoria} %comentado 13-01-14
\input{agradecimento}
%\input{epigrafe} %comentado 13-01-14


\baselineskip 1.1 \baselineskip

\input{resumo_abstract}

%========================= lista de tabelas, figuras e algoritmos=============
\listoffigures

\listoftables

%\listofalgorithms

%============================ acrónimos, símbolos e notações =================
\input{acro_notacao.tex}

%===============================sumário=======================================
% Tabela de conteudo
\setcounter{tocdepth}{5}
\tableofcontents

\newpage
%=============================== conteúdo =====================================
\pagenumbering{arabic}
\pagestyle{fancy}

\include{cap1} %Introducao

\include{cap2} %Revisao

\include{cap3}  %Desenvolvimento

\include{cap4}  %Resultados

\include{cap5}  %Analise e Discussao

\include{cap6}

\include{conclusao} %Conclusoes


%=============================== Bibliografia ===============================================
\addcontentsline{toc}{chapter}{Bibliografia}

\renewcommand{\bibname}{Bibliografia}
\markboth{Bibliografia}{Bibliografia}

\bibliographystyle{dcu}

\bibliography{referencias}

%\include{apendice}

\end{document}

% ====================
% Hierachical struture
% ====================
% command          |        level 
% --------------------------------------
% \part            | -1 (book and report) 0 (article)
% \chapter         | 0 (book and report only)
% \section         | 1
% \subsection      | 2
% \subsubsection   | 3
% \paragraph       | 4
% \subparagraph    | 5